import request from '@/utils/request'

/**
 * 获取dashboard数据
 */
export function getDashboardDataApi() {
  return request({
    url: '/sys/dashboard',
    method: 'get'
  })
}

// 获取文章统计数据
export function getBottomDataApi() {
  return request({
    url: '/sys/dashboard/bottom',
    method: 'get'
  })
}

/**
 * 获取浏览趋势数据
 * @param {string} period - 时间周期 ('week' | 'month')
 */
export function getBrowseTrendApi(period) {
  return request({
    url: '/sys/dashboard/browse-trend',
    method: 'get',
    params: { period }
  })
}